//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    motto: 'Hello World',
    userInfo: {},
    hasUserInfo: false,
    canIUse: wx.canIUse('button.open-type.getUserInfo')
  },
  //事件处理函数
  bindViewTap: function() {
    
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad: function () {
  
  },
  
  search:function(){
    if (app.globalData.userInfo == null){
      wx.redirectTo({
        url: '../login/login',
      })
    }else{
      //跳转到查询自己的页面
    }
  },
  uploadInfo:function(){
    if (app.globalData.userInfo == null) {
      wx.redirectTo({
        url: '../login/login',
      })
    } else {
      //跳转到上传信息的页面
      wx.navigateTo({
        url: '../upload/upload-info',
      })
    }
  }


})
